inherited fmSpisanieDoc: TfmSpisanieDoc
  Left = 484
  Top = 121
  Width = 989
  Height = 717
  Caption = #1056#1077#1075#1080#1089#1090#1088#1072#1094#1080#1103' '#1088#1072#1089#1093#1086#1076#1085#1099#1093' '#1076#1086#1082#1091#1084#1077#1085#1090#1086#1074
  Constraints.MinHeight = 717
  Constraints.MinWidth = 989
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 656
    Width = 981
  end
  inherited Panel1: TPanel
    Width = 981
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 811
    end
    inherited BitBtn2: TBitBtn
      Left = 899
    end
  end
  object dxBarDockControl1: TdxBarDockControl [2]
    Left = 0
    Top = 62
    Width = 981
    Height = 26
    Align = dalTop
    BarManager = dxBarManager1
  end
  object dbgDoc: TcxGrid [3]
    Left = 0
    Top = 88
    Width = 981
    Height = 313
    Align = alTop
    Constraints.MinHeight = 100
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 4
    LookAndFeel.Kind = lfStandard
    LookAndFeel.SkinName = 'Office2007Green'
    object tvDoc: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.Insert.Visible = True
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = True
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      OnCellDblClick = tvDocCellDblClick
      DataController.DataSource = dlgDS
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skCount
          FieldName = 'SIDID'
        end>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.CellEndEllipsis = True
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.CellTextMaxLineCount = 1
      OptionsView.ColumnAutoWidth = True
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      OptionsView.HeaderEndEllipsis = True
      OptionsView.Indicator = True
      Preview.Visible = True
      Styles.Header = DMInv.cxSiniyText
      object tvDocRPSDID: TcxGridDBColumn
        Caption = 'ID'
        DataBinding.FieldName = 'RPSDID'
        Width = 28
      end
      object tvDocFIO: TcxGridDBColumn
        Caption = #1055#1086#1076#1086#1090#1095#1077#1090#1085'. '#1083#1080#1094#1086
        DataBinding.FieldName = 'FIO'
        Width = 127
      end
      object tvDocRPSDDATE: TcxGridDBColumn
        Caption = #1044#1072#1090#1072
        DataBinding.FieldName = 'RPSDDATE'
        Width = 43
      end
      object tvDocRPSDSUMMA: TcxGridDBColumn
        Caption = #1057#1091#1084#1084#1072
        DataBinding.FieldName = 'RPSDSUMMA'
        Width = 50
      end
      object tvDocRPSDNOTE: TcxGridDBColumn
        Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
        DataBinding.FieldName = 'RPSDNOTE'
        Width = 100
      end
      object tvDocRPSDUSERENTER: TcxGridDBColumn
        Caption = #1040#1074#1090#1086#1088
        DataBinding.FieldName = 'RPSDUSERENTER'
        Width = 50
      end
      object tvDocRPSDTIMEENTER: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1089#1086#1079#1076#1072#1085#1080#1103
        DataBinding.FieldName = 'RPSDTIMEENTER'
        Width = 112
      end
      object tvDocRPSDUSEEDIT: TcxGridDBColumn
        Caption = #1056#1077#1076#1072#1082#1090#1086#1088
        DataBinding.FieldName = 'RPSDUSEEDIT'
        Width = 75
      end
      object tvDocRPSDTIMEEDIT: TcxGridDBColumn
        Caption = #1044#1072#1090#1072' '#1088#1077#1076#1072#1082#1090#1080#1088'.'
        DataBinding.FieldName = 'RPSDTIMEEDIT'
        Width = 87
      end
    end
    object cxGridLevel5: TcxGridLevel
      GridView = tvDoc
    end
  end
  object cxSplitter2: TcxSplitter [4]
    Left = 0
    Top = 401
    Width = 981
    Height = 8
    HotZoneClassName = 'TcxMediaPlayer9Style'
    AlignSplitter = salTop
    Control = dbgDoc
  end
  object Panel2: TPanel [5]
    Left = 0
    Top = 409
    Width = 981
    Height = 247
    Align = alClient
    TabOrder = 8
    object dxBarDockControl2: TdxBarDockControl
      Left = 1
      Top = 16
      Width = 979
      Height = 26
      Align = dalTop
      BarManager = dxBarManager1
    end
    object cxGrid1: TcxGrid
      Left = 1
      Top = 57
      Width = 487
      Height = 189
      Align = alLeft
      Constraints.MinWidth = 487
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      LookAndFeel.SkinName = 'Office2007Blue'
      object cxGridDBTableView1: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        OnCellDblClick = cxGridDBTableView1CellDblClick
        DataController.DataSource = dsCommon
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Kind = skCount
            FieldName = 'SIDID'
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object cxGridDBTableView1RPDATE: TcxGridDBColumn
          DataBinding.FieldName = 'RPDATE'
        end
        object cxGridDBTableView1RPSUMMA: TcxGridDBColumn
          DataBinding.FieldName = 'RPSUMMA'
        end
        object cxGridDBTableView1RPUSERENTER: TcxGridDBColumn
          DataBinding.FieldName = 'RPUSERENTER'
        end
        object cxGridDBTableView1RPTIMEENTER: TcxGridDBColumn
          DataBinding.FieldName = 'RPTIMEENTER'
        end
        object cxGridDBTableView1RPUSEREDIT: TcxGridDBColumn
          DataBinding.FieldName = 'RPUSEREDIT'
        end
        object cxGridDBTableView1RPTIMEEDIT: TcxGridDBColumn
          DataBinding.FieldName = 'RPTIMEEDIT'
        end
        object cxGridDBTableView1PPID_TO: TcxGridDBColumn
          DataBinding.FieldName = 'PPID_TO'
        end
        object cxGridDBTableView1RPTYPE: TcxGridDBColumn
          DataBinding.FieldName = 'RPTYPE'
        end
        object cxGridDBTableView1RPISDELETE: TcxGridDBColumn
          DataBinding.FieldName = 'RPISDELETE'
        end
        object cxGridDBTableView1CSID: TcxGridDBColumn
          DataBinding.FieldName = 'CSID'
        end
        object cxGridDBTableView1RPNOTE: TcxGridDBColumn
          DataBinding.FieldName = 'RPNOTE'
        end
        object cxGridDBTableView1RPFORM: TcxGridDBColumn
          DataBinding.FieldName = 'RPFORM'
        end
        object cxGridDBTableView1BPID: TcxGridDBColumn
          DataBinding.FieldName = 'BPID'
        end
        object cxGridDBTableView1SDID: TcxGridDBColumn
          DataBinding.FieldName = 'SDID'
        end
        object cxGridDBTableView1PNUM: TcxGridDBColumn
          DataBinding.FieldName = 'PNUM'
        end
        object cxGridDBTableView1SIDID: TcxGridDBColumn
          DataBinding.FieldName = 'SIDID'
        end
        object cxGridDBTableView1JLID: TcxGridDBColumn
          DataBinding.FieldName = 'JLID'
        end
        object cxGridDBTableView1SDID_DOC: TcxGridDBColumn
          DataBinding.FieldName = 'SDID_DOC'
        end
        object cxGridDBTableView1RPSDID: TcxGridDBColumn
          DataBinding.FieldName = 'RPSDID'
        end
        object cxGridDBTableView1RPID: TcxGridDBColumn
          DataBinding.FieldName = 'RPID'
        end
        object cxGridDBTableView1PPID: TcxGridDBColumn
          DataBinding.FieldName = 'PPID'
        end
      end
      object cxGridLevel1: TcxGridLevel
        GridView = cxGridDBTableView1
      end
    end
    object cxLabel2: TcxLabel
      Left = 1
      Top = 1
      Align = alTop
      Caption = '      '#1055#1086#1076#1090#1074#1077#1088#1078#1076#1072#1102#1097#1080#1077' '#1088#1072#1089#1093#1086#1076' '#1076#1086#1082#1091#1084#1077#1085#1090#1099
      Style.LookAndFeel.SkinName = 'Office2007Blue'
      StyleDisabled.LookAndFeel.SkinName = 'Office2007Blue'
      StyleFocused.LookAndFeel.SkinName = 'Office2007Blue'
      StyleHot.LookAndFeel.SkinName = 'Office2007Blue'
    end
    object cxGrid2: TcxGrid
      Left = 496
      Top = 57
      Width = 484
      Height = 189
      Align = alClient
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
      TabOrder = 3
      LookAndFeel.Kind = lfStandard
      LookAndFeel.SkinName = 'Office2007Blue'
      object cxGridDBTableView2: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        NavigatorButtons.PriorPage.Visible = True
        NavigatorButtons.Next.Visible = True
        NavigatorButtons.Insert.Visible = True
        NavigatorButtons.Append.Visible = False
        NavigatorButtons.Edit.Visible = False
        NavigatorButtons.Post.Visible = True
        NavigatorButtons.Cancel.Visible = False
        NavigatorButtons.Refresh.Visible = False
        NavigatorButtons.SaveBookmark.Visible = False
        NavigatorButtons.GotoBookmark.Visible = False
        NavigatorButtons.Filter.Visible = False
        DataController.DataSource = dsRPS
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Kind = skCount
            FieldName = 'SIDID'
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.CellHints = True
        OptionsCustomize.ColumnFiltering = False
        OptionsData.CancelOnExit = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.CellEndEllipsis = True
        OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
        OptionsView.CellAutoHeight = True
        OptionsView.CellTextMaxLineCount = 1
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.HeaderEndEllipsis = True
        OptionsView.Indicator = True
        Preview.Visible = True
        Styles.Header = DMInv.cxSiniyText
        object cxGridDBTableView2RPSID: TcxGridDBColumn
          DataBinding.FieldName = 'RPSID'
        end
        object cxGridDBTableView2RPID: TcxGridDBColumn
          DataBinding.FieldName = 'RPID'
        end
        object cxGridDBTableView2RPSSUMMA: TcxGridDBColumn
          DataBinding.FieldName = 'RPSSUMMA'
        end
        object cxGridDBTableView2RPSUSERENTER: TcxGridDBColumn
          DataBinding.FieldName = 'RPSUSERENTER'
        end
        object cxGridDBTableView2RPSTIMEENTER: TcxGridDBColumn
          DataBinding.FieldName = 'RPSTIMEENTER'
        end
        object cxGridDBTableView2RPSUSEREDIT: TcxGridDBColumn
          DataBinding.FieldName = 'RPSUSEREDIT'
        end
        object cxGridDBTableView2RPSTIMEEDIT: TcxGridDBColumn
          DataBinding.FieldName = 'RPSTIMEEDIT'
        end
        object cxGridDBTableView2SDID: TcxGridDBColumn
          DataBinding.FieldName = 'SDID'
        end
        object cxGridDBTableView2SDID_ED_IZM: TcxGridDBColumn
          DataBinding.FieldName = 'SDID_ED_IZM'
        end
        object cxGridDBTableView2RPSKOL: TcxGridDBColumn
          DataBinding.FieldName = 'RPSKOL'
        end
        object cxGridDBTableView2RPSCENA: TcxGridDBColumn
          DataBinding.FieldName = 'RPSCENA'
        end
        object cxGridDBTableView2RPSNOTE: TcxGridDBColumn
          DataBinding.FieldName = 'RPSNOTE'
        end
        object cxGridDBTableView2RPSSPEEDOMETR: TcxGridDBColumn
          DataBinding.FieldName = 'RPSSPEEDOMETR'
        end
        object cxGridDBTableView2DOLID_POTREBITEL: TcxGridDBColumn
          DataBinding.FieldName = 'DOLID_POTREBITEL'
        end
        object cxGridDBTableView2JLID_POTREBITEL: TcxGridDBColumn
          DataBinding.FieldName = 'JLID_POTREBITEL'
        end
        object cxGridDBTableView2SDID_POTREBITEL_OBJECT: TcxGridDBColumn
          DataBinding.FieldName = 'SDID_POTREBITEL_OBJECT'
        end
        object cxGridDBTableView2SDID_STATJA_RASHODOV: TcxGridDBColumn
          DataBinding.FieldName = 'SDID_STATJA_RASHODOV'
        end
        object cxGridDBTableView2RPSDATEPROD: TcxGridDBColumn
          DataBinding.FieldName = 'RPSDATEPROD'
        end
        object cxGridDBTableView2RPSDATEPRODEND: TcxGridDBColumn
          DataBinding.FieldName = 'RPSDATEPRODEND'
        end
        object cxGridDBTableView2RPSISDELETE: TcxGridDBColumn
          DataBinding.FieldName = 'RPSISDELETE'
        end
        object cxGridDBTableView2VESORV: TcxGridDBColumn
          DataBinding.FieldName = 'VESORV'
        end
        object cxGridDBTableView2SDNAME: TcxGridDBColumn
          DataBinding.FieldName = 'SDNAME'
        end
        object cxGridDBTableView2PREDOSTAVIL: TcxGridDBColumn
          DataBinding.FieldName = 'PREDOSTAVIL'
        end
        object cxGridDBTableView2POTREBITEL_OBJECT: TcxGridDBColumn
          DataBinding.FieldName = 'POTREBITEL_OBJECT'
        end
        object cxGridDBTableView2POTREBITEL_FIO: TcxGridDBColumn
          DataBinding.FieldName = 'POTREBITEL_FIO'
        end
        object cxGridDBTableView2STATJA_RASHODOV: TcxGridDBColumn
          DataBinding.FieldName = 'STATJA_RASHODOV'
        end
      end
      object cxGridLevel2: TcxGridLevel
        GridView = cxGridDBTableView2
      end
    end
    object cxLabel3: TcxLabel
      Left = 1
      Top = 42
      Align = alTop
      Caption = #1055#1086#1079#1080#1094#1080#1080' '#1087#1086' '#1076#1086#1082#1091#1084#1077#1085#1090#1072#1084'      '
      Style.LookAndFeel.SkinName = 'Blue'
      StyleDisabled.LookAndFeel.SkinName = 'Blue'
      StyleFocused.LookAndFeel.SkinName = 'Blue'
      StyleHot.LookAndFeel.SkinName = 'Blue'
      Properties.Alignment.Horz = taRightJustify
      AnchorX = 980
    end
    object cxSplitter1: TcxSplitter
      Left = 488
      Top = 57
      Width = 8
      Height = 189
      HotZoneClassName = 'TcxMediaPlayer9Style'
      Control = cxGrid1
    end
  end
  object cxLabel1: TcxLabel [6]
    Left = 0
    Top = 45
    Align = alTop
    Caption = #1055#1077#1088#1074#1080#1095#1085#1099#1077' '#1087#1086#1076#1086#1090#1095#1077#1090#1085#1099#1077' '#1076#1086#1082#1091#1084#1077#1085#1090#1099
  end
  inherited dlgDS: TDataSource
    DataSet = qPerv
    Left = 240
    Top = 160
  end
  object dxBarManager1: TdxBarManager
    AllowReset = False
    AlwaysSaveText = True
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    Categories.Strings = (
      'Default')
    Categories.ItemsVisibles = (
      2)
    Categories.Visibles = (
      True)
    ImageOptions.Images = DMInv.cxSmallImages
    LookAndFeel.Kind = lfFlat
    LookAndFeel.NativeStyle = False
    LookAndFeel.SkinName = ''
    MenuAnimations = maFade
    NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
    PopupMenuLinks = <>
    UseF10ForMenu = False
    UseSystemFont = True
    Left = 192
    Top = 159
    DockControlHeights = (
      0
      0
      0
      0)
    object dxBarManager1Bar2: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      Caption = 'Custom 2'
      CaptionButtons = <>
      DockControl = dxBarDockControl1
      DockedDockControl = dxBarDockControl1
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 551
      FloatTop = 183
      FloatClientWidth = 51
      FloatClientHeight = 44
      ItemLinks = <
        item
          Visible = True
          ItemName = 'bbadd'
        end
        item
          Visible = True
          ItemName = 'bbedit'
        end
        item
          Visible = True
          ItemName = 'bbdel'
        end>
      NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object dxBarManager1Bar1: TdxBar
      AllowClose = False
      AllowCustomizing = False
      AllowQuickCustomizing = False
      AllowReset = False
      Caption = 'Custom 1'
      CaptionButtons = <>
      DockControl = dxBarDockControl2
      DockedDockControl = dxBarDockControl2
      DockedLeft = 0
      DockedTop = 0
      FloatLeft = 409
      FloatTop = 163
      FloatClientWidth = 0
      FloatClientHeight = 0
      ItemLinks = <
        item
          Visible = True
          ItemName = 'dxBarButton5'
        end
        item
          Visible = True
          ItemName = 'dxBarButton6'
        end
        item
          Visible = True
          ItemName = 'dxBarButton7'
        end>
      OneOnRow = True
      Row = 0
      UseOwnFont = False
      UseRestSpace = True
      Visible = True
      WholeRow = False
    end
    object dxBarButton1: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 57
    end
    object dxBarButton2: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 41
    end
    object dxBarButton3: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 10
    end
    object bbnewjl: TdxBarButton
      Caption = #1053#1086#1074#1086#1077' '#1102#1088#1083#1080#1094#1086
      Category = 0
      Hint = #1053#1086#1074#1086#1077' '#1102#1088#1083#1080#1094#1086
      Visible = ivNever
      ImageIndex = 40
      PaintStyle = psCaptionGlyph
    end
    object dxBarButton4: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 54
    end
    object bbadd: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Visible = ivAlways
      ImageIndex = 57
      OnClick = bbaddClick
    end
    object bbedit: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Visible = ivAlways
      ImageIndex = 54
      OnClick = bbeditClick
    end
    object bbdel: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Visible = ivAlways
      ImageIndex = 10
      OnClick = bbdelClick
    end
    object cbShowDoc: TcxBarEditItem
      Caption = #1054#1090#1082#1083#1102#1095#1080#1090#1100' '#1087#1088#1086#1089#1084#1086#1090#1088
      Category = 0
      Hint = #1054#1090#1082#1083#1102#1095#1080#1090#1100' '#1087#1088#1086#1089#1084#1086#1090#1088
      Visible = ivAlways
      ShowCaption = True
      Width = 100
      PropertiesClassName = 'TcxCheckBoxProperties'
      Properties.Alignment = taLeftJustify
      Properties.NullStyle = nssUnchecked
      Properties.ValueChecked = 1
      Properties.ValueUnchecked = 0
      InternalEditValue = 1
    end
    object bbRegRashDoc: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 56
    end
    object dxBarSubItem1: TdxBarSubItem
      Caption = 'New SubItem'
      Category = 0
      Visible = ivAlways
      ItemLinks = <>
    end
    object dxBarButton5: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 57
      OnClick = dxBarButton5Click
    end
    object dxBarButton6: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 54
      OnClick = dxBarButton6Click
    end
    object dxBarButton7: TdxBarButton
      Caption = 'New Button'
      Category = 0
      Hint = 'New Button'
      Visible = ivAlways
      ImageIndex = 10
    end
  end
  object qPerv: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    SQL.Strings = (
      'SELECT rpsd.*,'
      
        'p1.plastname || '#39' '#39' || SUBSTRING(p1.pname FROM 1 FOR 1) || '#39'. '#39' ' +
        '|| COALESCE(SUBSTRING(p1.ppatronymic FROM 1 FOR 1) || '#39'.'#39', '#39' '#39') ' +
        'AS fio,'
      'SID.SIDFILENAME'
      'FROM RP_SPISANIEDOC rpsd'
      'INNER JOIN PERSON_PODOTCH pp ON pp.PPID = rpsd.PPID'
      'INNER JOIN PEOPLE p1 ON p1.PID = pp.PP_ID'
      'LEFT OUTER JOIN SCAN_INDOC SID ON SID.SIDID = rpsd.SIDID'
      'WHERE rpsd.RPSDISDELETE IS NULL AND pp.PPTYPE = 4'
      'AND p1.PISDELETE IS null'
      '')
    UpdateObject = quPerv
    GeneratorField.Field = 'RPSDID'
    GeneratorField.Generator = 'GEN_RP_SPISANIEDOC_ID'
    Left = 280
    Top = 160
    object qPervRPSDID: TIntegerField
      FieldName = 'RPSDID'
      Origin = '"RP_SPISANIEDOC"."RPSDID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qPervPPID: TIntegerField
      FieldName = 'PPID'
      Origin = '"RP_SPISANIEDOC"."PPID"'
    end
    object qPervSIDID: TIntegerField
      FieldName = 'SIDID'
      Origin = '"RP_SPISANIEDOC"."SIDID"'
    end
    object qPervRPSDDATE: TDateField
      FieldName = 'RPSDDATE'
      Origin = '"RP_SPISANIEDOC"."RPSDDATE"'
    end
    object qPervRPSDSUMMA: TIBBCDField
      FieldName = 'RPSDSUMMA'
      Origin = '"RP_SPISANIEDOC"."RPSDSUMMA"'
      Precision = 18
      Size = 2
    end
    object qPervRPSDNOTE: TIBStringField
      FieldName = 'RPSDNOTE'
      Origin = '"RP_SPISANIEDOC"."RPSDNOTE"'
      Size = 2048
    end
    object qPervRPSDUSERENTER: TIBStringField
      FieldName = 'RPSDUSERENTER'
      Origin = '"RP_SPISANIEDOC"."RPSDUSERENTER"'
      Size = 40
    end
    object qPervRPSDTIMEENTER: TDateTimeField
      FieldName = 'RPSDTIMEENTER'
      Origin = '"RP_SPISANIEDOC"."RPSDTIMEENTER"'
    end
    object qPervRPSDUSEEDIT: TIBStringField
      FieldName = 'RPSDUSEEDIT'
      Origin = '"RP_SPISANIEDOC"."RPSDUSEEDIT"'
      Size = 40
    end
    object qPervRPSDTIMEEDIT: TDateTimeField
      FieldName = 'RPSDTIMEEDIT'
      Origin = '"RP_SPISANIEDOC"."RPSDTIMEEDIT"'
    end
    object qPervRPSDISDELETE: TIntegerField
      FieldName = 'RPSDISDELETE'
      Origin = '"RP_SPISANIEDOC"."RPSDISDELETE"'
    end
    object qPervFIO: TIBStringField
      FieldName = 'FIO'
      ProviderFlags = []
      Size = 769
    end
    object qPervSIDFILENAME: TIBStringField
      FieldName = 'SIDFILENAME'
      Origin = '"SCAN_INDOC"."SIDFILENAME"'
      Size = 255
    end
  end
  object quPerv: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RPSDID,'
      '  PPID,'
      '  SIDID,'
      '  RPSDDATE,'
      '  RPSDSUMMA,'
      '  RPSDNOTE,'
      '  RPSDUSERENTER,'
      '  RPSDTIMEENTER,'
      '  RPSDUSEEDIT,'
      '  RPSDTIMEEDIT,'
      '  RPSDISDELETE'
      'from RP_SPISANIEDOC '
      'where'
      '  RPSDID = :RPSDID')
    ModifySQL.Strings = (
      'update RP_SPISANIEDOC'
      'set'
      '  PPID = :PPID,'
      '  RPSDDATE = :RPSDDATE,'
      '  RPSDID = :RPSDID,'
      '  RPSDISDELETE = :RPSDISDELETE,'
      '  RPSDNOTE = :RPSDNOTE,'
      '  RPSDSUMMA = :RPSDSUMMA,'
      '  SIDID = :SIDID'
      'where'
      '  RPSDID = :OLD_RPSDID')
    InsertSQL.Strings = (
      'insert into RP_SPISANIEDOC'
      
        '  (PPID, RPSDDATE, RPSDID, RPSDISDELETE, RPSDNOTE, RPSDSUMMA, SI' +
        'DID)'
      'values'
      
        '  (:PPID, :RPSDDATE, :RPSDID, :RPSDISDELETE, :RPSDNOTE, :RPSDSUM' +
        'MA, :SIDID)')
    DeleteSQL.Strings = (
      'update RP_SPISANIEDOC'
      'set'
      '  RPSDISDELETE = 1'
      'where'
      '  RPSDID = :OLD_RPSDID'
      '')
    Left = 320
    Top = 160
  end
  object dsCommon: TDataSource
    DataSet = qCommon
    Left = 216
    Top = 416
  end
  object qCommon: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qCommonAfterInsert
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'SELECT rp.*, sid.SIDFILENAME'
      'FROM RASPRED_PODOTCH rp'
      'LEFT OUTER JOIN SCAN_INDOC SID ON sid.SIDID = rp.SIDID'
      'WHERE rp.RPISDELETE IS NULL'
      '    AND rp.RPSDID = :RPSDID')
    UpdateObject = quCommon
    GeneratorField.Field = 'RPID'
    GeneratorField.Generator = 'GEN_RASPRED_PODOTCH_ID'
    Left = 248
    Top = 416
    ParamData = <
      item
        DataType = ftInteger
        Name = 'RPSDID'
        ParamType = ptUnknown
        Size = 4
      end>
    object qCommonRPID: TIntegerField
      FieldName = 'RPID'
      Origin = '"RASPRED_PODOTCH"."RPID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qCommonRPDATE: TDateField
      FieldName = 'RPDATE'
      Origin = '"RASPRED_PODOTCH"."RPDATE"'
    end
    object qCommonPPID: TIntegerField
      FieldName = 'PPID'
      Origin = '"RASPRED_PODOTCH"."PPID"'
    end
    object qCommonRPSUMMA: TIBBCDField
      FieldName = 'RPSUMMA'
      Origin = '"RASPRED_PODOTCH"."RPSUMMA"'
      Precision = 18
      Size = 2
    end
    object qCommonRPUSERENTER: TIBStringField
      FieldName = 'RPUSERENTER'
      Origin = '"RASPRED_PODOTCH"."RPUSERENTER"'
      Size = 40
    end
    object qCommonRPTIMEENTER: TDateTimeField
      FieldName = 'RPTIMEENTER'
      Origin = '"RASPRED_PODOTCH"."RPTIMEENTER"'
    end
    object qCommonRPUSEREDIT: TIBStringField
      FieldName = 'RPUSEREDIT'
      Origin = '"RASPRED_PODOTCH"."RPUSEREDIT"'
      Size = 40
    end
    object qCommonRPTIMEEDIT: TDateTimeField
      FieldName = 'RPTIMEEDIT'
      Origin = '"RASPRED_PODOTCH"."RPTIMEEDIT"'
    end
    object qCommonPPID_TO: TIntegerField
      FieldName = 'PPID_TO'
      Origin = '"RASPRED_PODOTCH"."PPID_TO"'
    end
    object qCommonRPTYPE: TIntegerField
      FieldName = 'RPTYPE'
      Origin = '"RASPRED_PODOTCH"."RPTYPE"'
    end
    object qCommonRPISDELETE: TIntegerField
      FieldName = 'RPISDELETE'
      Origin = '"RASPRED_PODOTCH"."RPISDELETE"'
    end
    object qCommonCSID: TSmallintField
      FieldName = 'CSID'
      Origin = '"RASPRED_PODOTCH"."CSID"'
    end
    object qCommonRPNOTE: TIBStringField
      FieldName = 'RPNOTE'
      Origin = '"RASPRED_PODOTCH"."RPNOTE"'
      Size = 255
    end
    object qCommonRPFORM: TIntegerField
      FieldName = 'RPFORM'
      Origin = '"RASPRED_PODOTCH"."RPFORM"'
    end
    object qCommonBPID: TIntegerField
      FieldName = 'BPID'
      Origin = '"RASPRED_PODOTCH"."BPID"'
    end
    object qCommonSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"RASPRED_PODOTCH"."SDID"'
    end
    object qCommonPNUM: TIntegerField
      FieldName = 'PNUM'
      Origin = '"RASPRED_PODOTCH"."PNUM"'
    end
    object qCommonSIDID: TIntegerField
      FieldName = 'SIDID'
      Origin = '"RASPRED_PODOTCH"."SIDID"'
    end
    object qCommonJLID: TIntegerField
      FieldName = 'JLID'
      Origin = '"RASPRED_PODOTCH"."JLID"'
    end
    object qCommonSDID_DOC: TIntegerField
      FieldName = 'SDID_DOC'
      Origin = '"RASPRED_PODOTCH"."SDID_DOC"'
    end
    object qCommonRPSDID: TIntegerField
      FieldName = 'RPSDID'
      Origin = '"RASPRED_PODOTCH"."RPSDID"'
    end
    object qCommonRPDOCNUM: TIBStringField
      FieldName = 'RPDOCNUM'
      Origin = '"RASPRED_PODOTCH"."RPDOCNUM"'
      Size = 40
    end
    object qCommonRPDOCDATE: TDateTimeField
      FieldName = 'RPDOCDATE'
      Origin = '"RASPRED_PODOTCH"."RPDOCDATE"'
    end
    object qCommonSIDFILENAME: TIBStringField
      FieldName = 'SIDFILENAME'
      Origin = '"SCAN_INDOC"."SIDFILENAME"'
      Size = 255
    end
  end
  object quCommon: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RPID,'
      '  RPDATE,'
      '  PPID,'
      '  RPSUMMA,'
      '  RPUSERENTER,'
      '  RPTIMEENTER,'
      '  RPUSEREDIT,'
      '  RPTIMEEDIT,'
      '  PPID_TO,'
      '  RPTYPE,'
      '  RPISDELETE,'
      '  CSID,'
      '  RPNOTE,'
      '  RPFORM,'
      '  BPID,'
      '  SDID,'
      '  PNUM,'
      '  SIDID,'
      '  JLID,'
      '  SDID_DOC,'
      '  RPSDID,'
      '  RPDOCNUM,'
      '  RPDOCDATE,'
      '  SIDFILENAME'
      'from RASPRED_PODOTCH '
      'where'
      '  RPID = :RPID')
    ModifySQL.Strings = (
      'update RASPRED_PODOTCH'
      'set'
      '  BPID = :BPID,'
      '  CSID = :CSID,'
      '  JLID = :JLID,'
      '  PNUM = :PNUM,'
      '  PPID = :PPID,'
      '  PPID_TO = :PPID_TO,'
      '  RPDATE = :RPDATE,'
      '  RPDOCDATE = :RPDOCDATE,'
      '  RPDOCNUM = :RPDOCNUM,'
      '  RPFORM = :RPFORM,'
      '  RPID = :RPID,'
      '  RPISDELETE = :RPISDELETE,'
      '  RPNOTE = :RPNOTE,'
      '  RPSDID = :RPSDID,'
      '  RPSUMMA = :RPSUMMA,'
      '  RPTYPE = :RPTYPE,'
      '  SDID = :SDID,'
      '  SDID_DOC = :SDID_DOC,'
      '  SIDID = :SIDID'
      'where'
      '  RPID = :OLD_RPID')
    InsertSQL.Strings = (
      'insert into RASPRED_PODOTCH'
      
        '  (BPID, CSID, JLID, PNUM, PPID, PPID_TO, RPDATE, RPDOCDATE, RPD' +
        'OCNUM, '
      
        '   RPFORM, RPID, RPISDELETE, RPNOTE, RPSDID, RPSUMMA, RPTYPE, SD' +
        'ID, SDID_DOC, '
      '   SIDID)'
      'values'
      
        '  (:BPID, :CSID, :JLID, :PNUM, :PPID, :PPID_TO, :RPDATE, :RPDOCD' +
        'ATE, :RPDOCNUM, '
      
        '   :RPFORM, :RPID, :RPISDELETE, :RPNOTE, :RPSDID, :RPSUMMA, :RPT' +
        'YPE, :SDID, '
      '   :SDID_DOC, :SIDID)')
    DeleteSQL.Strings = (
      'update RASPRED_PODOTCH'
      'set'
      '  RPISDELETE = 1'
      'where'
      '  RPID = :OLD_RPID')
    Left = 280
    Top = 416
  end
  object dsRPS: TDataSource
    DataSet = qRPS
    Left = 568
    Top = 424
  end
  object qRPS: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dsCommon
    SQL.Strings = (
      
        'SELECT RPS.*, SD.SDNAME, (COALESCE(jl.JLOPF,'#39' '#39')||'#39' '#39'||'#39'"'#39'||JL.J' +
        'LEGALNAME||'#39'"'#39')  AS predostavil,'
      'sd4.SDNAME AS potrebitel_object,'
      'IIF (P1.PID IS NOT NULL,'
      
        'p1.plastname || '#39' '#39' || SUBSTRING(p1.pname FROM 1 FOR 1) || '#39'. '#39' ' +
        '|| COALESCE(SUBSTRING(p1.ppatronymic FROM 1 FOR 1) || '#39'.'#39', '#39' '#39'),'
      'COALESCE(jl1.JLOPF,'#39' '#39')||'#39' '#39'||'#39'"'#39'||JL1.JLEGALNAME||'#39'"'#39
      ') AS potrebitel_fio,'
      'sd5.SDNAME AS statja_rashodov'
      'FROM RP_SERVICES RPS'
      'INNER JOIN RASPRED_PODOTCH rp ON rp.RPID = rps.RPID'
      'INNER JOIN SYS_DIC SD ON SD.SDID = RPS.SDID'
      
        'LEFT OUTER JOIN SYS_DIC SD4 ON SD4.SDID = RPS.SDID_POTREBITEL_OB' +
        'JECT'
      
        'LEFT OUTER JOIN SYS_DIC SD5 ON SD5.SDID = RPS.SDID_STATJA_RASHOD' +
        'OV'
      'LEFT OUTER JOIN DOLJNOST d ON d.DOLID = RPS.DOLID_POTREBITEL'
      'LEFT OUTER JOIN PEOPLE P1 ON P1.PID = d.PID'
      'LEFT OUTER JOIN JURLITSA jl ON jl.JLID = RP.JLID'
      'LEFT OUTER JOIN JURLITSA jl1 ON jl1.JLID = RPS.JLID_POTREBITEL'
      'WHERE RPS.RPID = :RPID')
    GeneratorField.Field = 'RPSID'
    Left = 616
    Top = 424
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'RPID'
        ParamType = ptUnknown
      end>
    object qRPSRPSID: TIntegerField
      FieldName = 'RPSID'
      Origin = '"RP_SERVICES"."RPSID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qRPSRPID: TIntegerField
      FieldName = 'RPID'
      Origin = '"RP_SERVICES"."RPID"'
    end
    object qRPSRPSSUMMA: TIBBCDField
      FieldName = 'RPSSUMMA'
      Origin = '"RP_SERVICES"."RPSSUMMA"'
      Precision = 18
      Size = 2
    end
    object qRPSRPSUSERENTER: TIBStringField
      FieldName = 'RPSUSERENTER'
      Origin = '"RP_SERVICES"."RPSUSERENTER"'
      Size = 40
    end
    object qRPSRPSTIMEENTER: TDateTimeField
      FieldName = 'RPSTIMEENTER'
      Origin = '"RP_SERVICES"."RPSTIMEENTER"'
    end
    object qRPSRPSUSEREDIT: TIBStringField
      FieldName = 'RPSUSEREDIT'
      Origin = '"RP_SERVICES"."RPSUSEREDIT"'
      Size = 40
    end
    object qRPSRPSTIMEEDIT: TDateTimeField
      FieldName = 'RPSTIMEEDIT'
      Origin = '"RP_SERVICES"."RPSTIMEEDIT"'
    end
    object qRPSSDID: TIntegerField
      FieldName = 'SDID'
      Origin = '"RP_SERVICES"."SDID"'
    end
    object qRPSSDID_ED_IZM: TIntegerField
      FieldName = 'SDID_ED_IZM'
      Origin = '"RP_SERVICES"."SDID_ED_IZM"'
    end
    object qRPSRPSKOL: TIBBCDField
      FieldName = 'RPSKOL'
      Origin = '"RP_SERVICES"."RPSKOL"'
      Precision = 18
      Size = 2
    end
    object qRPSRPSCENA: TIBBCDField
      FieldName = 'RPSCENA'
      Origin = '"RP_SERVICES"."RPSCENA"'
      Precision = 18
      Size = 2
    end
    object qRPSRPSNOTE: TIBStringField
      FieldName = 'RPSNOTE'
      Origin = '"RP_SERVICES"."RPSNOTE"'
      Size = 255
    end
    object qRPSRPSSPEEDOMETR: TIBBCDField
      FieldName = 'RPSSPEEDOMETR'
      Origin = '"RP_SERVICES"."RPSSPEEDOMETR"'
      Precision = 18
      Size = 2
    end
    object qRPSDOLID_POTREBITEL: TIntegerField
      FieldName = 'DOLID_POTREBITEL'
      Origin = '"RP_SERVICES"."DOLID_POTREBITEL"'
    end
    object qRPSJLID_POTREBITEL: TIntegerField
      FieldName = 'JLID_POTREBITEL'
      Origin = '"RP_SERVICES"."JLID_POTREBITEL"'
    end
    object qRPSSDID_POTREBITEL_OBJECT: TIntegerField
      FieldName = 'SDID_POTREBITEL_OBJECT'
      Origin = '"RP_SERVICES"."SDID_POTREBITEL_OBJECT"'
    end
    object qRPSSDID_STATJA_RASHODOV: TIntegerField
      FieldName = 'SDID_STATJA_RASHODOV'
      Origin = '"RP_SERVICES"."SDID_STATJA_RASHODOV"'
    end
    object qRPSRPSDATEPROD: TDateField
      FieldName = 'RPSDATEPROD'
      Origin = '"RP_SERVICES"."RPSDATEPROD"'
    end
    object qRPSRPSDATEPRODEND: TDateField
      FieldName = 'RPSDATEPRODEND'
      Origin = '"RP_SERVICES"."RPSDATEPRODEND"'
    end
    object qRPSRPSISDELETE: TIntegerField
      FieldName = 'RPSISDELETE'
      Origin = '"RP_SERVICES"."RPSISDELETE"'
    end
    object qRPSVESORV: TIBBCDField
      FieldName = 'VESORV'
      Origin = '"RP_SERVICES"."VESORV"'
      Precision = 18
      Size = 2
    end
    object qRPSSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qRPSPREDOSTAVIL: TIBStringField
      FieldName = 'PREDOSTAVIL'
      ProviderFlags = []
      Size = 268
    end
    object qRPSPOTREBITEL_OBJECT: TIBStringField
      FieldName = 'POTREBITEL_OBJECT'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qRPSPOTREBITEL_FIO: TIBStringField
      FieldName = 'POTREBITEL_FIO'
      ProviderFlags = []
      Size = 769
    end
    object qRPSSTATJA_RASHODOV: TIBStringField
      FieldName = 'STATJA_RASHODOV'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
end
